<style type="text/css">
	.welcome:hover{
		cursor: default;
	}
	#nav{
		width:100%; 
		padding-left:230px;
		padding-right: 230px;
		padding-bottom: 0px;
	}
</style>
<nav id="nav" class="navbar navbar-default" role="navigation">
  <!-- Brand and toggle get grouped for better mobile display -->
  <div class="navbar-header">
    <a class="navbar-brand" href="${basePath}">MGBlog</a>
  </div>

  <!-- Collect the nav links, forms, and other content for toggling -->
  <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
    <ul class="nav navbar-nav">
    <#if loginUser??>
      <li class="active"><a href="article_toWriteArticleUI.do"><span class="glyphicon glyphicon-book"></span>写文章</a></li>
    </#if>
    </ul>
   
    <ul class="nav navbar-nav navbar-right">
    	<#if loginUser??>
	      <li><a href="javascript:void(0);" class="welcome">欢迎你,<red>${(loginUser.nickName)!"defaultUser"}</red></a></li>
	      <li><a href="#"><img src="${basePath}pages/image/win_mlmw_logo.gif" width="20" /></a></li>
	      
	      <li class="dropdown">
	        <a href="#" title="设置" class="dropdown-toggle" data-toggle="dropdown">
	        	<span class="glyphicon glyphicon-cog" style="font-size: 16px;"></span>
	        </a>
	        <ul class="dropdown-menu">
	          <li><a href="#">修改密码</a></li>
	          <li><a href="#">修改头像</a></li>
	          <li><a href="#">修改昵称</a></li>
	          <li><a href="#">完善信息</a></li>
	          <li class="divider"></li>
	          <li><a href="nc_logout.do" title="退出博客" style="font-size: 16px;"><span class="glyphicon glyphicon-remove-circle"  style="font-size:16px;"></span>退出</a></li>
	        </ul>
	    <#else>
	    	 <li><a href="javascript:void(0);" id="btn_login">登陆</a></li>
        </#if>
      </li>
      
    </ul>
  </div><!-- /.navbar-collapse -->
</nav>
<#if loginUser??>
<#else>

<!-- jquery.layer.js的弹出层html支持 -->
<div id="div_login" style="display: none;width:400px;">
	<#include "../user/login.html"/>
</div>
<script type="text/javascript">
	$(function(){
		$("#btn_login").click(function(){
			$.layer({
			    type: 1,
			    shade: [0.5, '#000'],
			    area: ['auto', 'auto'],
			    title: '专属会员登陆',
			    border: [5, 0.5, '#fff'],
			    page: {dom : '#div_login'}
			});
		});
		
	});
</script>
</#if>